<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>全部分类</title>
<link rel="icon" th:href="@{/blog/images/favicon.ico}" type="image/ico">
<meta name="keywords" content="blog" />
<meta name="description" content="blog" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link th:href="@{/blog/css/base.css}" rel="stylesheet">
<link th:href="@{/blog/css/m.css}" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/jquery/jquery@3.2.1/dist/jquery.min.js"></script>
<script th:src="@{/blog/js/comm.js}"></script>

  <!--[if lt IE 9]>
<script th:src="@{/blog/js/modernizr.js}"></script>
<![endif]-->
  <link rel="stylesheet" th:href="@{/css/my.css}">
  <link rel="stylesheet" th:href="@{/layui/css/layui.css}"  media="all">
  <script th:src="@{/layui/layui.js}" charset="utf-8"></script>
</head>
<body>
<header th:replace="blog/header::header-fragment"></header>
<article> 
  <!--lbox begin-->

  <div class="rightbox">
    <div class="whitebg bloglist">
      <h2 class="htitle">最新博文</h2>
      <!--pagelist-->
      <ul>
        <li th:each="blog : ${blog}">
          <a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"><h3 class="blogtitle">[[${blog.title}]]</h3></a>
          <span class="blogpic imgscale"><i><a th:href="@{/blog/{id}(id=${blog.id})}" th:text="${blog.flag}"></a></i><a th:href="@{/blog/{id}(id=${blog.id})}" title=""><img th:src="@{${blog.firstPicture}}" alt=""></a></span>
          <p class="blogtext" th:text="${blog.context}"></p>
          <p class="bloginfo"><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}"></span><span>【<a th:href="@{/types/{id}(id=${blog.typeId})}" th:text="${blog.type.name}" ></a>】</span></p>
          <a th:href="@{/blog/{id}(id=${blog.id})}" class="viewmore">阅读更多</a>
        </li>
      </ul>
      <!--pagelist end-->
    </div>
    
    <!--bloglist end--> 
  </div>


  <div class="leftbox touming">
    <div class="" >
      <ul class="layui-nav"><li class="layui-nav-item"><a th:href="@{/type}">全部</a></li></ul>
    <ul class="layui-nav" th:each="type:${type}">
      <li class="layui-nav-item" ><a th:href="@{/types/{id}(id=${type.id})}">[[${type.name}]]</a></li>
    </ul>
    </div>
  </div>

</article>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<footer th:replace="blog/footer::footer-fragment"></footer>
<script>
  layui.use('element', function(){
    var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

    //监听导航点击
    element.on('nav(demo)', function(elem){
      //console.log(elem)
      layer.msg(elem.text());
    });
  });
</script>
</body>
</html>
